package com.my.attendance.dao;

import com.my.attendance.entity.Attendance;
import com.my.attendance.entity.Employee;
import com.my.attendance.util.BaseDAO;

import java.util.List;

public class AttendanceDAO extends BaseDAO {

    public List<Attendance> getAttendanceList() throws Exception {
        String sql="select * from attendance;";
        Object[] obj = {};
        return getList(sql,new Attendance(),obj);
    }

    public Employee getEmployeeName(Integer employee_number) throws Exception {
        String sql = "select name from employee where employee_number=?";
        Object[] obj ={employee_number};
        return getOne(sql, new Employee(),employee_number);
    }
}
